/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mvp.levelup.generics;

import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import mvp.levelup.trees.PlayerRatio;

/**
 *
 * @author WORKSPOT2
 */
public class GenericsTest
{

    public static void main(String[] args)
    {
        Parcel<PlayerRatio> parcel = new Parcel<PlayerRatio>(3, PlayerRatio.class);

        parcel.addEntity(new PlayerRatio(3, 643));
        parcel.addEntity(new PlayerRatio(4, 789));
        parcel.addEntity(new PlayerRatio(5, 232));
        Set<PlayerRatio> ratio = parcel.getPage();
        showElements(ratio);
        Iterator<PlayerRatio> iter = parcel.getPage().iterator();
        while (iter.hasNext())
        {
            System.out.println(iter.next());
        }
        
//        List<PlayerRatio> ratios = new ArrayList<PlayerRatio>();
//        List<TestEntity> entities = ratios;
    }

    private static void showElements(Collection<? extends Comparable> colls)
    {
        Iterator<? extends Comparable> iter = colls.iterator();
        while (iter.hasNext())
        {
            System.out.println(iter.next());
        }
    }
}
